package me.magicall.db.sql.expression;

import me.magicall.db.sql.Operator;

/**
 * 表达式操作符
 * 
 * @author MaGiCalL
 */
public enum ExpressionOperator implements Operator<Expression<?>> {

	ADD("+"), //
	SUB("-"), //
	MULTI("*"), //
	DIVID("/"), //
	MOD(" MOD "), //
	AND(" AND "), //用于between
	;
	private final String sign;

	private ExpressionOperator(final String sign) {
		this.sign = sign;
	}

	@Override
	public String toSql() {
		return sign;
	}

	@Override
	public StringBuilder appendTo(final StringBuilder sb) {
		return sb.append(sign);
	}

	@Override
	public String toString() {
		return toSql();
	}
}
